//
//  MessageHomeCell.swift
//  WeiBoOfSwift
//
//  Created by aven wu on 08/05/2018.
//  Copyright © 2018 GML. All rights reserved.
//

import UIKit

class MessageHomeCell: UITableViewCell {
    
    
    @IBOutlet weak var icon: UIImageView!
    
   
    @IBOutlet weak var nameLab: UILabel!
    
    
    @IBOutlet weak var messageLab: UILabel!
    
    @IBOutlet weak var roleIcon: UIImageView!
    
    @IBOutlet weak var creatTimeLab: UILabel!
    
    var model:UserOfMessage?
    {
        didSet{
            icon.setImageWith((model?.user?.profile_image_URL as URL?)!, placeholderImage: nil)
            nameLab.text = model?.user?.name
            roleIcon.image = model?.user?.verifiedImage
            messageLab.text = model?.direct_message?.text
            creatTimeLab.text = model?.direct_message?.created_at
        }
    }
}
